<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            height: 100px;
            width: 450px;
            margin: 0 auto;
        }
        .block {
            background-color: black;
            opacity: 0.5;
            float: left;
            width: 80px;
            margin-left: 10px;
            height: 100px;
            color: white;
            font-size: 69px;
            text-align: center;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="block">
            0
        </div>

        <div class="block">
            0
        </div>
        
        <div class="block">
            :
        </div>
        
        <div class="block">
            0
        </div>
        
        <div class="block">
            0
        </div>
        <div style="height: 0;"></div>
    </div>
    <script>
        var t = document.getElementsByClassName("block");
        console.log(t);
        var deadTime = new Date("2022-7-9 19:00:00").getTime();
        var cur = Date.now();
        function updateTime() {
            var div = deadTime - cur;
            var s = Math.floor(div / 1000 % 60);
            var m = Math.floor(div / 1000 / 60);
            t[0].innerHTML = Math.floor(m / 10);
            t[1].innerHTML = m % 10;
            t[3].innerHTML = Math.floor(s / 10);
            t[4].innerHTML = s % 10;
            cur = Date.now();
        }
        setInterval(function() {
            updateTime();
        }, 10)
    </script>
</body>
</html>